(component
  (core module $main (;0;)
    (type (;0;) (func (param i32 i32 i32 i32) (result i32)))
    (table (;0;) 2 funcref)
    (memory (;0;) 17)
    (global (;0;) (mut i32) i32.const 1048576)
    (global (;1;) (mut i32) i32.const 1048576)
    (global (;2;) (mut i32) i32.const 0)
    (global (;3;) i32 i32.const 1048592)
    (global (;4;) i32 i32.const 1)
    (global (;5;) (mut i32) i32.const 1048592)
    (global (;6;) (mut i32) i32.const 1114112)
    (export "__stack_pointer" (global 0))
    (export "__stack_high" (global 1))
    (export "__stack_low" (global 2))
    (export "foo:memory_base" (global 3))
    (export "foo:table_base" (global 4))
    (export "__heap_base" (global 5))
    (export "__heap_end" (global 6))
    (export "cabi_realloc" (func 0))
    (export "__indirect_function_table" (table 0))
    (export "memory" (memory 0))
    (func (;0;) (type 0) (param i32 i32 i32 i32) (result i32)
      local.get 0
      local.get 1
      local.get 2
      local.get 3
      i32.const 1
      call_indirect (type 0)
    )
    (@producers
      (processed-by "wit-component" "$CARGO_PKG_VERSION")
    )
  )
  (core module $foo (;1;)
    (@dylink.0
      (mem-info (memory 0 4))
    )
    (type (;0;) (func (param i32 i32 i32 i32) (result i32)))
    (type (;1;) (func (param i32)))
    (type (;2;) (func (param i32 i32)))
    (import "env" "cabi_realloc" (func $cabi_realloc.0 (;0;) (type 0)))
    (export "cabi_realloc" (func $cabi_realloc.1))
    (export "test:test/test#foo" (func $foo))
    (func $cabi_realloc.1 (;1;) (type 0) (param i32 i32 i32 i32) (result i32)
      i32.const -257976192
    )
    (func $foo (;2;) (type 2) (param i32 i32))
  )
  (core module $__init (;2;)
    (type (;0;) (func))
    (type (;1;) (func (param i32)))
    (type (;2;) (func (param i32 i32 i32 i32) (result i32)))
    (import "env" "memory" (memory (;0;) 0))
    (import "env" "__indirect_function_table" (table (;0;) 0 funcref))
    (import "foo" "cabi_realloc" (func (;0;) (type 2)))
    (start 1)
    (elem (;0;) (i32.const 1) func)
    (elem (;1;) (i32.const 1) func 0)
    (func (;1;) (type 0))
    (data (;0;) (i32.const 1048576) "\00\00\00\00\00\00\10\00")
    (@producers
      (processed-by "wit-component" "$CARGO_PKG_VERSION")
    )
  )
  (core instance $main (;0;) (instantiate $main))
  (alias core export $main "memory" (core memory $memory (;0;)))
  (alias core export $main "cabi_realloc" (core func $cabi_realloc (;0;)))
  (core instance $env (;1;)
    (export "cabi_realloc" (func $cabi_realloc))
  )
  (core instance $foo (;2;) (instantiate $foo
      (with "env" (instance $env))
    )
  )
  (core instance $__init (;3;) (instantiate $__init
      (with "env" (instance $main))
      (with "foo" (instance $foo))
    )
  )
  (type (;0;) (func (param "x" string)))
  (alias core export $foo "test:test/test#foo" (core func $test:test/test#foo (;1;)))
  (alias core export $foo "cabi_realloc" (core func $"#core-func2 cabi_realloc" (@name "cabi_realloc") (;2;)))
  (func $foo (;0;) (type 0) (canon lift (core func $test:test/test#foo) (memory $memory) (realloc $"#core-func2 cabi_realloc") string-encoding=utf8))
  (component $test:test/test-shim-component (;0;)
    (type (;0;) (func (param "x" string)))
    (import "import-func-foo" (func (;0;) (type 0)))
    (type (;1;) (func (param "x" string)))
    (export (;1;) "foo" (func 0) (func (type 1)))
  )
  (instance $test:test/test-shim-instance (;0;) (instantiate $test:test/test-shim-component
      (with "import-func-foo" (func $foo))
    )
  )
  (export $test:test/test (;1;) "test:test/test" (instance $test:test/test-shim-instance))
  (@producers
    (processed-by "wit-component" "$CARGO_PKG_VERSION")
  )
)
